package cn.wanho.service.user;

import cn.wanho.dto.ExamMenuRole;
import cn.wanho.dto.ExamUser;
import cn.wanho.rvo.ResultVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;

/**
 * 用户服务
 */

public interface UserService {

    /** 注册 */
    public boolean register(ExamUser user);

    /**用户的登录操作*/
   // ResultVO login(String userName, String userPass);

    ResultVO insertAdmin(Integer userId, String userName);

    /** @author jingxu 修改用户的信息，根据传入的tooken信息,取到用户的id*/
    ResultVO updateUserById(Long id, String userName, String userIcon, String personInfo);

    ResultVO updatePassWord(String oldPass, String newPass, Integer userId);


    List<ExamMenuRole> selectListByPath(String url);

    ExamUser selectByName(String username);

    List<ExamMenuRole> selectListByUser(Long id);

    /**
     * @author zxy
     * @date 2022/8/5
     * 创建老师
     */
    public ResultVO createTeacher(String userName, String userPass, HttpServletRequest request);

    /**用于excel*/
    ResultVO importExcel(MultipartFile file, HttpServletRequest request) throws IOException;


    /**
     * @author jingxu
     * 学生查询个人信息*/
    ResultVO selectStudentInformation(Long id);

    ResultVO queryStudentAllScore(Integer userId);

    ResultVO studentApplyFor(Long subjectId, Integer userId);
}
